Skip to content

Spec 027: Deploy, rollback, restart and health on a team's own Ansible repository - #623

Open
shipmill-romamo[bot] wants to merge 1 commit into
mainfrom
spec/027-brownfield-deploy
Open

shipmill-romamo[bot] wants to merge 1 commit into
mainfrom
spec/027-brownfield-deploy

Conversation

@shipmill-romamo

@shipmill-romamo shipmill-romamo Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Spec for #618

Plan

  • Serves: G-4
  • Files: docs/specs/027-brownfield-deploy.md
  • Order: the spec alone, with status: approved; its build issues are filed under the feature issue once it merges
  • Proof: specs.py check passes; each acceptance criterion names the exit code, output or file a test checks
  • Tests changed: none

Decisions for you

  1. Where a team declares its applications and components
    • Recommended: two group variables, cloudfall_applications and cloudfall_components, each a map of name to the same fields an Application or Component file holds today. They sit beside cloudfall_baselines and are read the same way. A component lists the inventory hosts it runs on in deployment.servers
    • Inside each host's cloudfall block, as components: [...], as the brownfield design sketched. Ansible replaces a whole cloudfall map that is set at both group and host level, so a group-level list would be lost on any host with its own block. The Server schema would also have to accept new keys
    • Separate applications/ and components/ files in the team's repository. That is a Cloudfall project inside theirs, the second copy the brownfield design rules out
  2. How the commands find the team's repository
    • Recommended: the rule inventory show, audit and observe already use. Pass --inventory, or run the command in a directory whose ansible.cfg names an inventory and that is no project. mcp serve --repository fixes the repository when the server starts. A directory that is both a project and a repository is read as the project
    • Add a --repository flag and a CLOUDFALL_REPOSITORY variable to these commands. This is a second way to say the same thing, and the read-only commands don't have it
  3. Where the deploy record lives in the team's repository
    • Recommended: the same paths a project uses (D-16, D-24). Release receipts and agent proposals go in record/, release approvals in decisions/releases/, both committed. Artifacts, the rendered inventory, raw output and locks go in tmp/, which the team ignores. The repository's operation decisions already live in decisions/ and tmp/ the same way
    • One .cloudfall/ directory in their repository. It is tidier for them, but it gives a second layout to every reader and to why
    • Outside the repository, such as ~/.local/share/cloudfall. The record would then not survive losing the management host, which D-16 exists to prevent
  4. How Cloudfall's deploy playbooks reach the team's hosts
    • Recommended: run them as the team's own playbooks run. The team's inventory goes first and Cloudfall's rendered variables second, under the team's ansible.cfg, with Cloudfall's roles added to the roles path ahead of theirs. Their SSH key, user, become, vault and jump-host settings apply unchanged
    • Cloudfall's rendered inventory alone, under Cloudfall's own ansible.cfg, as in a project. Only the host's address, user and port carry over, so a team whose key or become settings live in their ansible.cfg or group_vars can't connect
  5. What an agent may do over mcp serve --repository
    • Recommended: add deploy, rollback, restart, health and build_artifact as tools. health and build_artifact run on a call. A confirmed deploy, rollback or restart never runs by itself: it records a proposal, and a person runs it with cloudfall operator approve at a terminal. This is S-018's gate. A repository can't declare an OperatorPolicy yet, so no call self-confirms there. It keeps the repository server's promise that no tool changes a host without a person
    • Keep the repository server read-only and leave deploys to the CLI. An agent could then only deploy through a shell, with no proposal in the record
  6. Existing projects
    • Recommended: unchanged. A project reads, renders, runs and answers exactly as before. The only visible change is a new optional --inventory flag on deploy, rollback, restart, health, release approve, operator approve, cloudfall-engine inventory render and cloudfall-engine artifact build
    • Move projects onto the same "team's ansible.cfg plus rendered inventory" run as well, so both share one path. That would change how every project's run connects, and cloudfall init emitting a plain Ansible inventory (left out of Plan for G-4: Works on the team's own Ansible inventory and config, not only on one Cloudfall set up #188) is the place for it

No item departs from a D-n rule. Item 5 widens the repository server's tool list, which S-018-18 had pinned. Items 1 and 6 add contract (two variables and one optional flag) without changing what a project does today.

🤖 Generated with Claude Code

@shipmill-romamo

Copy link
Copy Markdown
Contributor Author

@romamo Decision needed: approve spec 027 (deploy, rollback, restart and health on a team's Ansible repository, #618) with every recommendation in its "Decisions for you"?
CI on 55e49e4: 3 checks green

  1. Take every recommendation (recommended): the spec merges as written and its build issues are filed under A team runs deploy, rollback, restart and health on its own Ansible repository, with no Cloudfall project beside it #618. Teams declare cloudfall_applications and cloudfall_components as group variables, the deploy record uses a project's record/, decisions/ and tmp/ paths, Cloudfall's playbooks run under the team's own ansible.cfg, and existing projects only gain an optional --inventory flag. Note item 5: it adds deploy, rollback, restart, health and build_artifact to mcp serve --repository, widening the tool list S-018-18 pinned; a confirmed deploy, rollback or restart still only records a proposal that a person runs with cloudfall operator approve
  2. Take every recommendation except item 5: the repository server stays read-only (as S-018-18 says) and an agent deploys a team's repository only through the CLI, with no proposal in the record; the spec is revised in this PR and asked again
  3. Change other items (name them and the option you want): the spec is revised in this PR and asked again, so the build waits one more round

Reply here with a number or your own answer; shipmill takes this up on the tick after your reply.

@shipmill-romamo shipmill-romamo Bot added the needs-decision A shipmill session asked a question here; waits for a reply label Nov 26, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-decision A shipmill session asked a question here; waits for a reply

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants